import request from '@/utils/request'

// 查询人员培训列表
export function listPersonTrain(query) {
  return request({
    url: '/business/personTrain/list',
    method: 'get',
    params: query
  })
}

// 查询人员培训和用户培训记录列表
export function trainAndTrainRecordList(query) {
  return request({
    url: '/business/personTrain/trainAndTrainRecordList',
    method: 'get',
    params: query
  })
}

// 查询人员培训详细
export function getPersonTrain(id) {
  return request({
    url: '/business/personTrain/' + id,
    method: 'get'
  })
}

// 新增人员培训
export function addPersonTrain(data) {
  return request({
    url: '/business/personTrain',
    method: 'post',
    data: data
  })
}

// 修改人员培训
export function updatePersonTrain(data) {
  return request({
    url: '/business/personTrain',
    method: 'put',
    data: data
  })
}

// 删除人员培训
export function delPersonTrain(id) {
  return request({
    url: '/business/personTrain/' + id,
    method: 'delete'
  })
}
